//
//  KBaseCollectionView.m
//  Peanut
//
//  Created by Jim huang on 2018/3/23.
//  Copyright © 2018年 Jim_Peanut. All rights reserved.
//

#import "KBaseCollectionView.h"

@implementation KBaseCollectionView

-(void)endRefresh{
    if (self.mj_header) {
        if (self.mj_header.isRefreshing) {
            [self.mj_header endRefreshing];
        }
    }
    if (self.mj_footer) {
        if (self.mj_footer.isRefreshing) {
            [self.mj_footer endRefreshing];
        }
    }
    [self reloadData];
}
-(void)beginRefresh{
    if (self.mj_header) {
        [self.mj_header beginRefreshing];
    }
}

-(void)endRefreshingWithNoMore{
    if (self.mj_header) {
        if (self.mj_header.isRefreshing) {
            [self.mj_header endRefreshing];
        }
    }
    
    if (self.mj_footer) {
        if (self.mj_footer.isRefreshing) {
            [self.mj_footer endRefreshingWithNoMoreData];
        }
    }
    
}

@end
